//
//  ImagePanel.h
//  mcrmSAAS
//
//  Created by wjxfhxy on 15-6-3.
//  Copyright (c) 2015年 GuangZhouXuanWu. All rights reserved.
//

@class ImageButton;

//@protocol ImageButtonDelegate <NSObject>
//
//-(void)clickImageButton:(ImageButton*)imageButton;
//@end

@interface ImageButton : UIView<XUIButtonDelegate,UIViewExtendDelegate>

@property(nonatomic,assign) BOOL hiddenDeleteTag;
@property(nonatomic,retain) UIImage *image;
//@property(nonatomic,weak) id<ImageButtonDelegate> delegate;

@end

@class ImagePanel;

@protocol ImagePanelDelegate <NSObject>

@optional

-(void)clickAddImageButtonOfImagePanel:(ImagePanel*)imagePanel;

-(void)clickDeleteImageButtonOfImagePanel:(ImagePanel*)imagePanel;

-(void)clickDeleteModeImageButtonOfImagePanel:(ImagePanel*)imagePanel atTag:(NSString*)tag;

-(void)imagePanel:(ImagePanel*)imagePanel didClickedImageButton:(ImageButton*)imageButton imageContains:(NSArray*)imageContains;

@end

@interface ImagePanel : UIView//<ImageButtonDelegate>
{
    ImageButton *_addImageBtn;
    ImageButton *_deleteImageBtn;
    ImageButton *_imageBtn1;
    ImageButton *_imageBtn2;
    ImageButton *_imageBtn3;
    
    NSMutableArray *_contain;
    
    BOOL _deleteMode;
}

@property(nonatomic,weak) id<ImagePanelDelegate> delegate;

@property(nonatomic,assign) BOOL controlEnable;

@property(nonatomic,assign) BOOL hiddenDeleteTag;

@property(nonatomic,readonly) NSUInteger imageCount;

-(void)addImage:(UIImage*)image withTag:(NSString*)tag;

-(void)replaceImage:(UIImage*)image withTag:(NSString*)tag;

-(void)deleteImageWithTag:(NSString*)szTag;

@end
